FROM centos:centos7
ADD ./CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
ADD ./jdk-8u311-linux-x64.tar.gz /home/
ADD ./chromedriver /usr/bin/
ADD ./google-chrome-stable_current_x86_64.rpm /home/google-chrome-stable_current_x86_64.rpm

RUN echo "====>更新源===" \
    && yum clean all && yum makecache \
    && yum install -y /home/google-chrome-stable_current_x86_64.rpm \
    && rm -rf /home/google-chrome-stable_current_x86_64.rpm \
    && yum clean all \
    && echo "====>打包基本环境即将完成==="


ENV JASYPT_PASSWORD 1
ENV JAVA_HOME=/home/jdk1.8.0_311
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
CMD java -jar -Djasypt.encryptor.password=$JASYPT_PASSWORD /home/acm-rating.jar
EXPOSE 8080

